const koa = require('koa');
const cors = require('koa2-cors');
const bodyParser = require('koa-bodyparser')
const userRouter = require('./user')
const wordRouter = require('./word')
const app = new koa()
app.use(cors());

app.use(bodyParser({
	enableTypes:['json', 'form', 'text']
}))

app.use(userRouter.routes(),bodyParser(),userRouter.allowedMethods());
app.use(wordRouter.routes(),bodyParser(),wordRouter.allowedMethods());

app.listen(3000)
